Don't write to parent repo
authorAlexander Larsson <alexl@redhat.com>
Thu, 29 Mar 2018 13:19:33 +0000 (15:19 +0200)
committerAtomic Bot <atomic-devel@projectatomic.io>
Thu, 29 Mar 2018 14:11:38 +0000 (14:11 +0000)
In _try_clone_from_payload_link, don't try to do the clone in the
parent repo, because we don't want to modify that. parent repos are
typically used when you want a shared, immutable base.

For example in flatpak, the parent repo is the system repo which you
don't have write access to, so any modification to it will fail with
EACCES, making it impossible to install via the system helper.

Closes: #1524
Approved by: cgwalters

src/libostree/ostree-repo-commit.c

index 12c4103dc1d9d4d9a3113594ac9b892acbe06fa4..7eb5ca93492ca721c9f2d53c8f35874f26795ce5 100644 (file)
@@ -777,8 +777,6 @@ _try_clone_from_payload_link (OstreeRepo   *self,
           return TRUE;
         }
     }
-  if (self->parent_repo)
-    return _try_clone_from_payload_link (self->parent_repo, payload_checksum, file_info, tmpf, cancellable, error);
 
   return TRUE;
 }